<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnNotfixyTypeInChatUnreadMessageInTable extends AbstractMigration
{
    public function up()
    {
        $this->table('chat_unread_message')->addColumn('notify_type', 'string', [
            'null' => false,
            'default' => '',
            'limit' => 200,
            'comment' => '通知类型',
        ])->save();
    }

    public function down()
    {
        $this->table('chat_unread_message')->removeColumn('notify_type')->save();
        $this->table('chat_unread_message')->removeIndexByName('idx_idx_notify_type')->save();
    }
}
